<template>
  <div>
      <div @click="$parent.$emit('foo')">
      <h1 @click="$emit('add',good)">{{foo}}</h1>
      </div>


      <h3>{{dong}}</h3>
  </div>
</template>

<script>
export default {
  name: "",
  data() {
    return {
        foo:'foo',
        good:'333333333'
    };
  },
  inject:['dong'],
  created(){
      this.$parent.$on('foo',()=>{
          console.log('ccccc')
      })
  },
  watch: {},
  methods: {}
};
</script>

<style scoped>
h1{
    margin: 50px;
    font-size: 24px;
    font-weight: 600px;
}
</style>
